<template>
  <div>
    <el-container>
      <el-header class="header" style="background-color: #409EFF; color: white">
        <img src="@/assets/logo.svg" alt="Logo" width="40" />
        <span class="logo-text">背单词应用</span>
      </el-header>
      <el-main class="main">
        <RouterView/>
      </el-main>
      <el-footer class="footer">
        Copy Right: © 2025 YIN Zheyuan. All Rights Reserved
      </el-footer>
    </el-container>
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue';
import { RouterView,useRouter } from 'vue-router';

const router = useRouter();
onMounted(()=>{
  router.push('/home')
})
</script>

<style scoped>
.header {
  display: flex;
  align-items: center; /* 垂直居中 */
}

.logo-container {
  display: flex;
  align-items: center; /* 图标和文字垂直对齐 */
  gap: 8px; /* 图标和文字间距 */
}
.main {
  background-color: var(--el-color-primary-light-9);
}
.footer{
  background-color: var(--el-color-primary-light-8);
}
</style>
